<?php 
namespace app\admin\validate;
use think\Validate;
class Member extends Validate{
	// 正则表达式 regex = ['zip'=>'\d{6}',...]
  protected $regex = [
  	// 'zname'=>'\w{2,6}',
    'istel'=>'1[3578]\d{9}', 
  ];

  // 当前验证的规则
  protected $rule = [
    'uname'=>'require',
  	'pwd'=>'require|confirm',
  	'utel'=>'require|istel',
  	'area'=>'require',
  	'gid'=>'require',

  ];

  // 验证提示信息
  protected $message = [
    'uname.require'=>'管理员姓名不能为空',
    'pwd.require'=>'密码不能为空',
  	'pwd.confirm'=>'密码输入不一致',
  	'utel.require'=>'联系方式不能为空',
  	'utel.istel'=>'手机号格式错误',
  	'area.require'=>'区域不能为空',
  	'gid.require'=>'职位不能为空',
 
  ];

  // 验证场景 scene = ['edit'=>'name1,name2,...']
  protected $scene = [
  	// 'add'=>'uname,email,pwd',
  	'login'=>'pwd.require',
  ];
}



 ?>